package com.gw.yunke.service.impl;

import com.gw.yunke.dao.VideoMapper;
import com.gw.yunke.domain.Video;
import com.gw.yunke.service.IVideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

@Service
public class VideoServiceImpl implements IVideoService{
    @Autowired
    private VideoMapper videoMapper;

    @Override
    public int createVideo(Video video) {
        return videoMapper.insertSelective(video);
    }

    //@Cacheable
    @Override
    public Video getVideoById(Long id) {
        return videoMapper.selectByPrimaryKey(id);
    }
}
